package com.travel.lib.base.utils;

import android.widget.Toast;

import com.travel.lib.base.BaseApplication;

/**
 * Created by spc on 2017/8/10.
 */

public class ToastUtils {
    private static Toast mToast;
    public static void show(String text) {
        if (mToast == null) {
            mToast = Toast.makeText(BaseApplication.getInst(), text, Toast.LENGTH_SHORT);
        } else {
            mToast.setText(text);
            mToast.setDuration(Toast.LENGTH_SHORT);
        }
        mToast.show();
    }
}
